1. Field of the Invention
The present invention relates generally to data communication and, more particularly, to systems and methods for performing weighted random early detection (WRED) in a data forwarding sub-system.
2. Description of Related Art
Network devices, such as routers, relay streams of data through a network from a source to a destination. Typically, the network devices include one or more memory subsystems to temporarily buffer data before transferring the data from the device. A network device can assign a number of queues (e.g., where a queue can be considered a logical first-in, first-out (FIFO) buffer) with which to buffer the data. In some instances, queues can be associated with characteristics of the data, such as destination interfaces (e.g., ports) of the data and/or a “class” of the data or some other combination of characteristics.
In some situations, data can build up too quickly in the queues (i.e., data is enqueued at a faster rate than it is dequeued), thereby causing congestion. To avoid forced “tail dropping” (i.e., dropping a chunk (e.g., a packet) of data from the tail of a queue, or before it is added to the queue), network devices can proactively employ a Random Early Detection (RED) technique to randomly drop chunks of data and ease congestion in the queues. RED techniques typically involve fixed-size queues in which fixed threshold values determine when chunks of data are randomly dropped and with what probabilities.
WRED generally drop packets selectively based on IP precedence. Packets with a higher IP precedence are less likely to be dropped than packets with a lower precedence. Thus, higher priority traffic is delivered with a higher probability than lower priority traffic.
Some network devices implement WRED techniques by defining WRED rules and implement RED techniques by defining RED rules. But in such systems, the hardware or software resources needed for WRED typically cause the system to provide fewer WRED rules than RED rules. Network devices also commonly monitor various types of global resource usage, such as the amount of a buffer memory used by the queues. This allows indexing or selecting WRED rules based on usage levels to achieve a more aggressive drop profile for usage levels.